home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amcafext.lha / AMCAF_Examples / TdStars1.AMOS / TdStars1.amosSourceCode
AMOS Source Code  |  1995-07-14  |  2KB  |  49 lines

  1. ' ************************************* Commands used: 
  2. ' *                                   * Td Stars Bank      Td Stars Origin 
  3. ' *           Amcaf Examples          * Td Stars Limit     Td Stars Double Do
  4. ' *          Td Stars 1 V1.0          * Td Planes
  5. ' *      Written by Chris Hodges      * Td Accelerate Off
  6. ' *                                   * Td Gravity 
  7. ' ************************************* Td Init
  8. '                          
  9. ' Remove the mousepointer from screen. 
  10. Hide 
  11. ' Open a nice little screen with 8 colours.
  12. Screen Open 0,320,256,8,Lowres
  13. Curs Off : Flash Off : Paper 0 : Pen 1 : Cls 
  14. ' Load a backgroundpicture.
  15. Load Iff "data/inteloutside.iff"
  16. ' Set up the palette.
  17. ' We use the last two planes, so we need the colours 2,4,6 for the stars.
  18. Palette 0,$20,$444,$494,$999,$9D9,$DDD,$DFD
  19. ' Enable Double Buffering to avoid flickering. 
  20. Double Buffer 
  21. Autoback 0
  22. ' Limit the mouse to the screen boundaries.
  23. Wait Vbl : Limit Mouse 
  24. ' Define a bank for the stars. If you have a turbo board, you can increase 
  25. ' the amount of stars. 
  26.  Extension_8_0A7E 9,100
  27. ' Limit the stars to the screen. 
  28.  Extension_8_0A94 
  29. ' Set the planes for usage with Td Stars.
  30.  Extension_8_0BCC 1,2
  31. ' Turn off the acceleration. Test it also with acceleration. 
  32.  Extension_8_0BAE 
  33. ' Set the gravity to 0,5. Try other values.
  34.  Extension_8_0B78 0,5
  35. ' Now at last, initiate the stars. 
  36.  Extension_8_0AD0 
  37. ' Main loop: Repeat until the user presses a key or a mouse button.  
  38. Repeat 
  39.   ' Synchronisize with the raster beam.
  40.   Wait Vbl 
  41.   XM=X Screen(X Mouse) : YM=Y Screen(Y Mouse)
  42.    Extension_8_0AB8 XM,YM
  43.   ' Draw all the stars.
  44.    Extension_8_0AFC 
  45.   ' Swap the screens.
  46.   Screen Swap 
  47. Until Inkey$=Chr$(27) or Mouse Key<>0
  48. Screen Close 0
  49. End